package com.fin.quant.web.service;

import org.springframework.stereotype.Service;

@Service
public class StockDividendService {

    /**
     * 获取股票最新分红
     *
     * @param stockCode
     * @return
     */
    public float getStockCashDividend(String stockCode) {
        switch (stockCode) {
            case "601328":
                //交通银行
                return 0.355f;
            case "600036":
                //招商银行
                return 1.522f;
            default:
                throw new RuntimeException("不支持的股票分红");
        }
    }
}
